﻿using System;
using System.Collections.Generic;

namespace Bilibili.Model.Video
{
    public sealed class MovieModel
    {
        /// <summary>
        /// 1为收费，2为免费
        /// </summary>
        public int movie_status { get; set; }
        public MovieModel pay_user { get; set; }
        /// <summary>
        /// 0为未付费
        /// </summary>
        public int status { get; set; }
        public MovieModel payment { get; set; }
        public string pay_begin_time { get; set; }
        public decimal price { get; set; }
        public string product_id { get; set; }
        public MovieModel season { get; set; }
        public List<ActorModel> actor { get; set; }
        public string actors
        {
            get
            {
                if (actor.Count != 0)
                    return actor[0].Actor;
                else
                    return "";
            }
        }
        public List<TagModel> tags { get; set; }
        public string tag
        {
            get
            {
                string str = "";
                foreach (var item in tags)
                    str += item.Tag_Name + "、";
                if (str.Length != 0)
                    str = str.Remove(str.Length - 1);
                return str;
            }
        }
        public string area { get; set; }
        public string cover { get; set; }
        public string pub_time { get; set; }
        public string time
        {
            get
            {
                DateTime dt = Convert.ToDateTime(pub_time);
                return dt.ToString("yyyy-MM-dd");
            }
        }
        public string title { get; set; }
        public string total_duration { get; set; }
        public MovieModel activity { get; set; }
        public int activity_id { get; set; }
        public string link { get; set; }
        public string script_src { get; set; }
    }
}